﻿using System;
using System.Globalization;
using System.Linq;
using System.Windows.Data;

namespace HY.Common
{
    /// <summary>
    /// CommandParameter多参数传递
    /// </summary>
    public class ObjectConvert : IMultiValueConverter
    {
        /// <summary>
        /// 源属性传给目标属性
        /// </summary>
        /// <param name="values"></param>
        /// <param name="targetType"></param>
        /// <param name="parameter"></param>
        /// <param name="culture"></param>
        /// <returns></returns>
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            return values.ToArray();
        }
        /// <summary>
        /// 目标属性传给源属性
        /// </summary>
        /// <param name="value"></param>
        /// <param name="targetTypes"></param>
        /// <param name="parameter"></param>
        /// <param name="culture"></param>
        /// <returns></returns>
        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            return null;
        }
    }
}
